<?
/**
 * Copyright 2007 Melange.
 *
 * This file is part of Melange_Framework
 *
 * PHP-HTTP is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * PHP-HTTP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with PHP-HTTP; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * @package log
 *
 */


/**
 * Imports
 */
require_once("LoggerCategory.php");


/**
 * LoggerManager class
 *
 * The framework logger manager class
 *
 * @category    Melange Framework
 * @package     log
 * @copyright   Copyright (c) 2007 Jeroen Simons. All rights reserved
 * @author      Jeroen Simons <jeroen@melange.nl>
 * @link        http://www.melange.nl/
 *
 */
class LoggerManager {
	
	
	/**
	 * The static context
	 *
	 * @var Context
	 */
	private static $level;
	private static $file;

    /**
     * Return the logger
     *
     * @param string name
     * @return LoggerCategory
     */
    public static function getLogger($name) {
        $category = new LoggerCategory(self::$file);
        $category->setLevel(self::$level);
        $category->setName($name);
        return $category;
    }
	
	/**
	 * @return unknown
	 */
	public function getFile() {
		return $this->file;
	}
	
	/**
	 * @return Context
	 */
	public function getLevel() {
		return $this->level;
	}
	
	/**
	 * @param unknown_type $file
	 */
	public static function setFile($file) {
		self::$file = $file;
	}
	
	/**
	 * @param Context $level
	 */
	public static function setLevel($level) {
		self::$level = $level;
	}


}

?>
